<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新闻</title>
</head>

<body>
    <p style="color:red">旧语法</p>
    <h2>新闻列表</h2>
    <ul>
        <%for(let i in list){%>
        <li><%=list[i]%></li>
        <%}%>
    </ul>
    <%=text%>
        <%- text%>

        <hr />
        <p style="color:red">新语法</p>
        {{text}}
        {{@text}}
        {{if number > 20}}<h5>大于20</h5>{{else}}<h5>小于20</h5>{{/if}}
        <ul>
            {{each list}}
            <li>{{$index}}:{{$value}}</li>
            {{/each}}
        </ul>
        {{include '../component/footer.html'}}
</body>

</html>